﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace SHRIS.MIS.Entity.ScadaData
{
    [Table("tb_order")]
    public class OrderEntity : BaseScadaEnetity

    {
        /// <summary>
        /// 记录主键
        /// </summary>
        [Key]
        [Column("OrderId")]
        public Guid Id { get; set; }

        /// <summary>
        /// 传输编号
        /// </summary>
        [Required]
        public string SerialID { get; set; }

        /// <summary>
        /// 发送时间
        /// </summary>
        [Required]
        public DateTimeOffset SendTime { get; set; }


        /// <summary>
        /// 订单编号
        /// </summary>
        [Required]
        public string OrderCode { get; set; }

        /// <summary>
        /// 车架编号
        /// </summary>
        public string VINCode { get; set; }

        /// <summary>
        /// 整车型号
        /// </summary>
        [Required]
        public string CarTypeCode { get; set; }

        /// <summary>
        /// 工厂编号
        /// </summary>
        [Required]
        public string FactoryCode { get; set; }

        /// <summary>
        /// 车间编号
        /// </summary>
        [Required]
        public string WorkShop { get; set; }

        /// <summary>
        /// 产线编号
        /// </summary>
        public string LineCode { get; set; }

        /// <summary>
        /// 生产顺序号
        /// </summary>
        [Required]
        public int Sernr { get; set; }

        /// <summary>
        /// 计划上线日期
        /// </summary>
        [Required]
        public DateTimeOffset Onlinetime { get; set; }

        /// <summary>
        /// 订单状态 0=接收 1=下发成功 2=下发失败
        /// </summary>
        public int OrderStatus { get; set; }

        /// <summary>
        /// 订单下发时间（下发到下位系统的时间）
        /// </summary>
        public DateTimeOffset WriteTime { get; set; }

        /// <summary>
        /// 整车物料号
        /// </summary>
        [Required]
        public string PLNBEZ { get; set; }






    }
}
